#include<bits/stdc++.h>

using namespace std;

int str2int(char a[]) {
    int n;
    //scanf("%d",&n);
    n = 0;
    for (int i = 0; i < strlen(a); i++) {
        n = n * 10 + a[i] - '0';
    }

    return n;
}

int main() {
    char a[100] = "123456";
    cout << str2int(a);
    return 0;
}
